package com.ls.springlei01.controller;

import com.ls.springlei01.bean.Car;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//@ResponseBody
//@Controller

@Slf4j
@RestController
public class HelloController {

    @Autowired
    Car car;

    @RequestMapping("car")
    public Car car(){
        return car;
    }

    @RequestMapping("/hello")
    public String handle01(){
        log.info("请求进来了..........");
        return "new sprint boot 2";
    }
}
